1. Field of the Invention
The present invention generally relates to a flash file system and a driving method thereof; in particular, it relates to a flash file system and a driving method thereof which does not require the use of File Allocation Table (FAT) tile system and block interface.
2. Description of Related Art
Current NAND flash driving methods all adopt the architecture of Block Interface Driver layer plus File System Driver (FSD) layer, as shown in FIG. 1. The client layer 11 sends an access function having standard interface to the file system driver layer 12, and the file system driver layer 12, according to the parameters in the access function, controls the physical layer 14 via the block interface driver layer 13 to read data or write data from/into the flash 15. The physical layer 14 includes a flash translation layer (FTL) 141, a virtual file layer (VFL) 142 and a flash interface layer (FIL) 143.
Conventional file system driver layers mostly use the FAT file system. FAT file system provides powerful capabilities, enabling supports for functions such as basic file management, directory management, file attribution management, intelligent space management and the like, as well as supports for file operations, e.g. copy, deletion and editing etc. However, the implementation of the FAT file system is also relatively complicated, in which the file managed by the FAT file system is usually partitioned into blocks in unit of clusters, such blocks being discontinuous, dispersed in each area across the entire disk; for each file read/write operation, it involves in file/directory queries, performing required searches on a file allocation table so as to locate the positions of dispersed clusters, then respectively reading them, causing massive amount of code execution, thus affecting system performance to a certain extent. Specifically, after a certain duration in time of system use, as files with discontinuous clusters in blocks, i.e. disk fragments, accumulating more and more, each file read/write needs to first look up positions of massive disk fragments, thus reducing the performance of the system.
Furthermore, the advantage of using the block interface driver layer is the good compatibility, allowing to analogously infer the storage material as a physical device written/read in blocks composed of sectors, without considering whether there exist any special attributes in the physical material of such a storage material. Whereas, during the process of transferring data in the physical layer of any physical device to the client, it is required to add an operation of block interface conversion, thus losing the flexibility for adapting the physical layer interface by the upper system, causing such a physical device not to be able to perform write/read operations in accordance with the physical features most suitable for itself, consequently affecting the file system performance or even entire capability.